package com.project.server.domain.estates;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.project.common.annotation.Excel;
import com.project.common.core.domain.BaseEntity;
import com.project.server.domain.companies.TCompany;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 服务记录对象 t_service_record
 *
 * @author project
 * @date 2021-06-28
 */
public class TServiceRecord extends BaseEntity {

    private static final long serialVersionUID = -5786121108693403282L;

    /**
     * 服务记录编号
     */
    private Long serviceId;

    /**
     * 企业id
     */
    private Long compId;

    /**
     * 企业名称
     */
    @Excel(name = "企业名称")
    private String compName;

    /**
     * 服务人员id
     */
    private Long serverId;

    /**
     * 服务人员姓名
     */
    @Excel(name = "服务人员姓名")
    private String serviceName;

    /**
     * 服务人员电话
     */
    @Excel(name = "服务人员电话")
    private String serverPhone;

    /**
     * 用户微信openid
     */
    private String openid;

    /**
     * 用户姓名
     */
    @Excel(name = "用户姓名")
    private String userName;

    /**
     * 用户电话
     */
    @Excel(name = "用户电话")
    private String userPhone;

    /**
     * 服务事件
     */
    @Excel(name = "服务事件")
    private String serviceMatter;

    /**
     * 服务地址
     */
    @Excel(name = "服务地址")
    private String serviceAddress;

    /**
     * 事件图片
     */
    private String matterImg;

    /**
     * 完成图片
     */
    private String finishImg;

    /**
     * 服务类型
     */
    @Excel(name = "服务类型", readConverterExp = "00=水,01=电,02=电梯,03=其他")
    private String serviceType;

    /**
     * 服务时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "服务时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date serviceTime;

    /**
     * 服务评价等级（0代表非常不满意 1代表不满意 2代表一般 3代表满意 4代表非常满意）
     */
    @Excel(name = "服务评价等级", readConverterExp = "0=非常不满意,1=不满意,2=一般,3=满意,4=非常满意")
    private String serviceEvaluate;

    @Excel(name = "服务状态", readConverterExp = "0=未完成,1=已接单,2=已完成")
    private String serviceStatus;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 企业对象
     */
    private TCompany company;

    /**
     * 企业组
     */
    private Long[] compIds;

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public Long getCompId() {
        return compId;
    }

    public void setCompId(Long compId) {
        this.compId = compId;
    }

    public String getCompName() {
        return compName;
    }

    public void setCompName(String compName) {
        this.compName = compName;
    }

    public void setServerId(Long serverId) {
        this.serverId = serverId;
    }

    public Long getServerId() {
        return serverId;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getServerPhone() {
        return serverPhone;
    }

    public void setServerPhone(String serverPhone) {
        this.serverPhone = serverPhone;
    }

    public String getServiceAddress() {
        return serviceAddress;
    }

    public void setServiceAddress(String serviceAddress) {
        this.serviceAddress = serviceAddress;
    }

    public String getOpenId() {
        return openid;
    }

    public void setOpenId(String openid) {
        this.openid = openid;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setServiceMatter(String serviceMatter) {
        this.serviceMatter = serviceMatter;
    }

    public String getServiceMatter() {
        return serviceMatter;
    }

    public String getMatterImg() {
        return matterImg;
    }

    public void setMatterImg(String matterImg) {
        this.matterImg = matterImg;
    }

    public String getFinishImg() {
        return finishImg;
    }

    public void setFinishImg(String finishImg) {
        this.finishImg = finishImg;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceTime(Date serviceTime) {
        this.serviceTime = serviceTime;
    }

    public Date getServiceTime() {
        return serviceTime;
    }

    public void setServiceEvaluate(String serviceEvaluate) {
        this.serviceEvaluate = serviceEvaluate;
    }

    public String getServiceEvaluate() {
        return serviceEvaluate;
    }

    public String getServiceStatus() {
        return serviceStatus;
    }

    public void setServiceStatus(String serviceStatus) {
        this.serviceStatus = serviceStatus;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public TCompany getCompany() {
        return company;
    }

    public void setCompany(TCompany company) {
        this.company = company;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("serviceId", getServiceId())
                .append("compId", getCompId())
                .append("compName", getCompName())
                .append("serverId", getServerId())
                .append("serviceName", getServiceName())
                .append("serverPhone",getServerPhone())
                .append("openid", getOpenId())
                .append("userName", getUserName())
                .append("userPhone", getUserPhone())
                .append("serviceMatter", getServiceMatter())
                .append("serverAddress",getServiceAddress())
                .append("matterImg", getMatterImg())
                .append("finishImg", getFinishImg())
                .append("serviceType", getServiceType())
                .append("serviceTime", getServiceTime())
                .append("serviceEvaluate", getServiceEvaluate())
                .append("serviceStatus", getServiceStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("company", getCompany())
                .toString();
    }
}
